package com.hrt.bean;

import java.io.Serializable;
import java.sql.Timestamp;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.codehaus.jackson.annotate.JsonIgnoreProperties;

/** 
 * 礼品回复表
 */
@Entity
@Table(name = "gift_replys")
@JsonIgnoreProperties(value = { "hrtMember","giftDetail","usersInfor","comments"})
public class Replys implements Serializable {
	
	private static final long serialVersionUID = 1L;
	
	/**回复id*/
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "REPLYS_ID")
	private Long id;
	
	/**会员实体（前台）*/
	@ManyToOne(cascade = {CascadeType.REFRESH, CascadeType.MERGE}, optional = false)
	@JoinColumn(name = "MENBER_ID")
	private HRTMember hrtMember;
	/**会员实体Id（前台）*/
	@Column(name = "MENBER_ID",insertable=false,updatable=false)
	private Long hrtMemberId;
	
	/**会员实体名称*/
	@Column(name = "MENBER_NAME",length = 500)
	private String hrtMemberName;
	
	/**用户实体（后台）*/
	@ManyToOne(cascade = {CascadeType.REFRESH, CascadeType.MERGE}, optional = false)
	@JoinColumn(name = "Users_ID")
	private UsersInfor usersInfor;
	/**用户实体Id（后台）*/
	@Column(name = "Users_ID",insertable=false,updatable=false)
	private Long usersInforId;
	
	/**用户实体名称*/
	@Column(name = "Users_NAME",length = 500)
	private String usersInforName;
	
	
	/** 关联礼品规格实体 */
	@ManyToOne(cascade = {CascadeType.REFRESH, CascadeType.MERGE}, optional = false)
	@JoinColumn(name = "GDE_ID")
	private GiftDetail giftDetail;
	/** 礼品规格ID */
	@Column(name = "GDE_ID",insertable=false,updatable=false)
	private Long gdeId;
	
	/** 礼品规格名称 */
	@Column(name = "GDE_Name",length = 500)
	private String gdeName;
	
	/** 评论实体 */
	@ManyToOne(cascade = {CascadeType.REFRESH, CascadeType.MERGE}, optional = false)
	@JoinColumn(name = "COMMENTS_ID")
	private Comments comments;
	/** 评论ID */
	@Column(name = "COMMENTS_ID",insertable=false,updatable=false)
	private Long commentsId;
	

	/**礼品回复内容*/
	@Column(name = "REPLYS_CONTENT", length = 500)
	private String content;
	
	/** 
	 * 备注 
	 */
	@Column(name = "REPLYS_NOTE", length = 500)
	private String note;
	
	/**
	 * 删除标记 0未删除 1已删除
	 */
	@Column(name = "ISDELETE", length = 500)
	private Integer isdelete = 0;
	
	/**
	 * 回复时间, 默认系统当前时间
	 */
	@Column(name = "REPLYS_TIME", length = 500)
	private Timestamp replyTime;
	/* -----------------****------------------- */
	/*
	 *不在数据库显示的字段 
	 * */
	/**
	 * 记录评论时间
	 * */
	@Transient
	private String replysDate;
	
	
	// get() / set()
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public HRTMember getHrtMember() {
		return hrtMember;
	}

	public void setHrtMember(HRTMember hrtMember) {
		this.hrtMember = hrtMember;
	}

	public Long getHrtMemberId() {
		return hrtMemberId;
	}

	public void setHrtMemberId(Long hrtMemberId) {
		this.hrtMemberId = hrtMemberId;
	}

	public UsersInfor getUsersInfor() {
		return usersInfor;
	}

	public void setUsersInfor(UsersInfor usersInfor) {
		this.usersInfor = usersInfor;
	}

	public Long getUsersInforId() {
		return usersInforId;
	}

	public void setUsersInforId(Long usersInforId) {
		this.usersInforId = usersInforId;
	}

	public GiftDetail getGiftDetail() {
		return giftDetail;
	}

	public void setGiftDetail(GiftDetail giftDetail) {
		this.giftDetail = giftDetail;
	}

	public Long getGdeId() {
		return gdeId;
	}

	public void setGdeId(Long gdeId) {
		this.gdeId = gdeId;
	}

	public Comments getComments() {
		return comments;
	}

	public void setComments(Comments comments) {
		this.comments = comments;
	}

	public Long getCommentsId() {
		return commentsId;
	}

	public void setCommentsId(Long commentsId) {
		this.commentsId = commentsId;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getNote() {
		return note;
	}

	public void setNote(String note) {
		this.note = note;
	}


	public Integer getIsdelete() {
		return isdelete;
	}

	public void setIsdelete(Integer isdelete) {
		this.isdelete = isdelete;
	}

	public String getHrtMemberName() {
		return hrtMemberName;
	}

	public void setHrtMemberName(String hrtMemberName) {
		this.hrtMemberName = hrtMemberName;
	}

	public String getUsersInforName() {
		return usersInforName;
	}

	public void setUsersInforName(String usersInforName) {
		this.usersInforName = usersInforName;
	}

	public String getGdeName() {
		return gdeName;
	}

	public void setGdeName(String gdeName) {
		this.gdeName = gdeName;
	}

	public Timestamp getReplyTime() {
		return replyTime;
	}

	public void setReplyTime(Timestamp replyTime) {
		this.replyTime = replyTime;
	}

	public String getReplysDate() {
		return replysDate;
	}

	public void setReplysDate(String replysDate) {
		this.replysDate = replysDate;
	}
	
}
